function showResponse(responseText)  { 
	if(responseText.status){
		 $("#msgval").mumayitips({messages:responseText.message,type:1,times:1500});
		 $("form")[0].reset();
		 $("#validates").val('');
		 $("#usercontent").val('');
		 Ajaxpage.loadpage();
	}else{
		$("#msgval").mumayitips({messages:responseText.message,type:3,times:1500});
	}
}


$('.fr').live('click', function() {
	var commentid=$(this).attr("id");
	CommentString=commentid.split("_");
	IdCode=parseInt(CommentString[1]); 
	$('#comment_form').insertAfter($('.commentfrom_'+IdCode)).show();
	$('#reply_id').val(IdCode);
	$('#replay_validate').val('');
	$('#replay_msg').val('');
	var options = { 
            dataType: 'json',
            success:  showResponse
    };
	$('#replaymumayiform').ajaxForm(options); 
});



$(document).ready(function(){ 

	Ajaxpage.loadpage();
	var options = { 
			dataType: 'json',
			success:  showResponse
	};

	$('#mumayiform').ajaxForm(options); 

	$('#refreshcaptha').click(function(){
		$('#validateimg').attr('src',"vdimgck.php?"+Math.random());
	});

	$('#soncaptha').live('click', function() {
		$('#sonvalidateimg').attr('src',"vdimgck.php?"+Math.random());
	});
});